import request from '@/utils/request'
// 页面渲染
export const getXuekeInfo1 = (params) => request({
  url: '/admin/subject/directory',
  params
})
// 开关接口
export const changeSwith = (data) => request({
  url: `/admin/subject/directory/${data.id}`,
  method: 'put',
  data

})
// 删除
export const delInfo = (id) => request({
  url: `/admin/subject/directory/${id}`,
  method: 'DELETE'
})
// 上传图片
export const updataImg = (data) => request({
  url: '/admin/index/upload?mode=single&type=image',
  method: 'post',
  data
})
// 添加
export const addXuekeInfo = (data) => request({
  url: '/admin/subject/directory',
  method: 'post',
  data
})
// 修改回显
export const updataXuekeInfo = (params) => request({
  url: `/admin/subject/directory/${params}`
})
// 修改
export const updataInfo = (data) => request({
  url: `/admin/subject/directory/${data.id}`,
  method: 'put',
  data
})
// 搜索数据
export const getInfo = () => request({
  url: '/admin/subject/tree',
  method: 'get'
})
// 跳转
export const goXuekeInfo = (params) => request({
  url: `/admin/subject/directory/${params.id}`,
  params
})
